package com.bangdream.michelia.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

/**
 * @date on 2018/8/2 22:12
 * @email 909732184@qq.com
 * 直播
 */
public class LiveBean implements Parcelable{

    /**
     * id : ed9a8d1387c3419e89fbe411d749e4b2
     * createBy : 1
     * createDate : 2018-06-25 15:06:22
     * updateBy : 1
     * updateDate : 2018-07-27 09:18:53
     * delFlag : 0
     * pageNo : 1
     * pageSize : 100
     * orgId : a
     * supplier : 1
     * name : 测试直播-2-yan
     * type : 123
     * cover : http://inesa-test.oss-cn-shanghai.aliyuncs.com/byl/1530147886014577736.jpg
     * startTime : 2018-06-28 00:00:00
     * endTime : 2018-06-29 00:00:00
     * content : <p>测试直播课程简介</p>
     * visibleRange : 0
     * classHour : 44
     * cost : 0.01
     * platform : 0
     * appName : c1
     * state : 0
     * livePlayTeacherList : [{"id":"647d47a7673840748f33adcff3343dd4","delFlag":"0","pageNo":1,"pageSize":100,"livePlayId":"ed9a8d1387c3419e89fbe411d749e4b2","teacherId":"85500d90d7bd4211badd102e0a40e3c6","teacherName":"xiaoKTC"},{"id":"7254e18baf1646b2bd02140e4619f54c","delFlag":"0","pageNo":1,"pageSize":100,"livePlayId":"ed9a8d1387c3419e89fbe411d749e4b2","teacherId":"71e12ef6a6114ee3afd3117c88614c6f","teacherName":"xiaoK"},{"id":"f3e8ac87d55a47f38669059e21ac2fc2","delFlag":"0","pageNo":1,"pageSize":100,"livePlayId":"ed9a8d1387c3419e89fbe411d749e4b2","teacherId":"2c0ea7af733a4e5e9865205dc7bf2279","teacherName":"Eliy"}]
     * timeStateName : 已结束
     * livePersonCnt : 0
     */

    private String id;
    private String createBy;
    private String createDate;
    private String updateBy;
    private String updateDate;
    private String delFlag;
    private int pageNo;
    private int pageSize;
    private String orgId;
    private String supplier;
    private String name;
    private String type;
    private String cover;
    private String startTime;
    private String endTime;
    private String content;
    private String visibleRange;
    private String classHour;
    private String cost;
    private String platform;
    private String appName;
    private String state;
    private String timeStateName;
    private String livePersonCnt;
    private List<LivePlayTeacherListBean> livePlayTeacherList;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getVisibleRange() {
        return visibleRange;
    }

    public void setVisibleRange(String visibleRange) {
        this.visibleRange = visibleRange;
    }

    public String getClassHour() {
        return classHour;
    }

    public void setClassHour(String classHour) {
        this.classHour = classHour;
    }

    public String getCost() {
        return cost;
    }

    public void setCost(String cost) {
        this.cost = cost;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getTimeStateName() {
        return timeStateName;
    }

    public void setTimeStateName(String timeStateName) {
        this.timeStateName = timeStateName;
    }

    public String getLivePersonCnt() {
        return livePersonCnt;
    }

    public void setLivePersonCnt(String livePersonCnt) {
        this.livePersonCnt = livePersonCnt;
    }

    public List<LivePlayTeacherListBean> getLivePlayTeacherList() {
        return livePlayTeacherList;
    }

    public void setLivePlayTeacherList(List<LivePlayTeacherListBean> livePlayTeacherList) {
        this.livePlayTeacherList = livePlayTeacherList;
    }

    public static class LivePlayTeacherListBean implements Parcelable{
        /**
         * id : 647d47a7673840748f33adcff3343dd4
         * delFlag : 0
         * pageNo : 1
         * pageSize : 100
         * livePlayId : ed9a8d1387c3419e89fbe411d749e4b2
         * teacherId : 85500d90d7bd4211badd102e0a40e3c6
         * teacherName : xiaoKTC
         */

        private String id;
        private String delFlag;
        private int pageNo;
        private int pageSize;
        private String livePlayId;
        private String teacherId;
        private String teacherName;

        @Override
        public String toString() {
            return JSON.toJSONString(this);
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getDelFlag() {
            return delFlag;
        }

        public void setDelFlag(String delFlag) {
            this.delFlag = delFlag;
        }

        public int getPageNo() {
            return pageNo;
        }

        public void setPageNo(int pageNo) {
            this.pageNo = pageNo;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public String getLivePlayId() {
            return livePlayId;
        }

        public void setLivePlayId(String livePlayId) {
            this.livePlayId = livePlayId;
        }

        public String getTeacherId() {
            return teacherId;
        }

        public void setTeacherId(String teacherId) {
            this.teacherId = teacherId;
        }

        public String getTeacherName() {
            return teacherName;
        }

        public void setTeacherName(String teacherName) {
            this.teacherName = teacherName;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.delFlag);
            dest.writeInt(this.pageNo);
            dest.writeInt(this.pageSize);
            dest.writeString(this.livePlayId);
            dest.writeString(this.teacherId);
            dest.writeString(this.teacherName);
        }

        public LivePlayTeacherListBean() {
        }

        protected LivePlayTeacherListBean(Parcel in) {
            this.id = in.readString();
            this.delFlag = in.readString();
            this.pageNo = in.readInt();
            this.pageSize = in.readInt();
            this.livePlayId = in.readString();
            this.teacherId = in.readString();
            this.teacherName = in.readString();
        }

        public static final Creator<LivePlayTeacherListBean> CREATOR = new Creator<LivePlayTeacherListBean>() {
            @Override
            public LivePlayTeacherListBean createFromParcel(Parcel source) {
                return new LivePlayTeacherListBean(source);
            }

            @Override
            public LivePlayTeacherListBean[] newArray(int size) {
                return new LivePlayTeacherListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.createBy);
        dest.writeString(this.createDate);
        dest.writeString(this.updateBy);
        dest.writeString(this.updateDate);
        dest.writeString(this.delFlag);
        dest.writeInt(this.pageNo);
        dest.writeInt(this.pageSize);
        dest.writeString(this.orgId);
        dest.writeString(this.supplier);
        dest.writeString(this.name);
        dest.writeString(this.type);
        dest.writeString(this.cover);
        dest.writeString(this.startTime);
        dest.writeString(this.endTime);
        dest.writeString(this.content);
        dest.writeString(this.visibleRange);
        dest.writeString(this.classHour);
        dest.writeString(this.cost);
        dest.writeString(this.platform);
        dest.writeString(this.appName);
        dest.writeString(this.state);
        dest.writeString(this.timeStateName);
        dest.writeString(this.livePersonCnt);
        dest.writeList(this.livePlayTeacherList);
    }

    public LiveBean() {
    }

    protected LiveBean(Parcel in) {
        this.id = in.readString();
        this.createBy = in.readString();
        this.createDate = in.readString();
        this.updateBy = in.readString();
        this.updateDate = in.readString();
        this.delFlag = in.readString();
        this.pageNo = in.readInt();
        this.pageSize = in.readInt();
        this.orgId = in.readString();
        this.supplier = in.readString();
        this.name = in.readString();
        this.type = in.readString();
        this.cover = in.readString();
        this.startTime = in.readString();
        this.endTime = in.readString();
        this.content = in.readString();
        this.visibleRange = in.readString();
        this.classHour = in.readString();
        this.cost = in.readString();
        this.platform = in.readString();
        this.appName = in.readString();
        this.state = in.readString();
        this.timeStateName = in.readString();
        this.livePersonCnt = in.readString();
        this.livePlayTeacherList = new ArrayList<LivePlayTeacherListBean>();
        in.readList(this.livePlayTeacherList, LivePlayTeacherListBean.class.getClassLoader());
    }

    public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
        @Override
        public LiveBean createFromParcel(Parcel source) {
            return new LiveBean(source);
        }

        @Override
        public LiveBean[] newArray(int size) {
            return new LiveBean[size];
        }
    };
}
